package com.example.fan.airline_reservation.Model;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import cn.bmob.v3.BmobObject;
import cn.bmob.v3.datatype.BmobDate;

public class Fight extends BmobObject implements Serializable {
    private String FLIGHT;/*航班号*/
    private String AIRCRAFT_MODEL;/*飞机型号*/
    private double DATE;/*日期*/
    private String FROM;/*出发地*/
    private String FROMNAME;/*出发机场*/
    private String TO;/*目的地*/
    private String TONAME;/*目的地机场*/
    private double PRICE;/*价格*/
    private double TODATE;/*到达时间*/
    private int CurrentPeole=0;/*当前人数*/
    private int CurrentState=0;/*航班状态  0是正常 1是延误 2是取消*/
    private int DelayTime=0;/*延误时间*/


    public Fight(String FLIGHT,String AIRCRAFT_MODEL,Date DATE,
                 String FROM,String FROMNAME,
                 String TO,String TONAME,
                 double PRICE,
                 Date TODATE,
                 int currentPeole,
                 int currentState,
                 int delayTime){
        this.FLIGHT=FLIGHT;
        this.AIRCRAFT_MODEL=AIRCRAFT_MODEL;
        setDATE(DATE);
        this.FROM=FROM;
        this.FROMNAME=FROMNAME;
        this.TO=TO;
        this.TONAME=TONAME;
        this.PRICE=PRICE;
        setTODATE(TODATE);
        this.CurrentPeole=currentPeole;
        this.CurrentState=currentState;
        this.DelayTime=delayTime;
    }

    public Fight(){

    }
    public String getFLIGHT() {
        return FLIGHT;
    }

    public String getFROM() {
        return FROM;
    }

    public String getTO() {
        return TO;
    }

    public void setFLIGHT(String FLIGHT) {
        this.FLIGHT = FLIGHT;
    }

    public void setFROM(String FROM) {
        this.FROM = FROM;
    }

    public void setTO(String TO) {
        this.TO = TO;
    }

    public String getAIRCRAFT_MODEL() {
        return AIRCRAFT_MODEL;
    }

    public void setAIRCRAFT_MODEL(String AIRCRAFT_MODEL) {
        this.AIRCRAFT_MODEL = AIRCRAFT_MODEL;
    }

    public String getFROMNAME() {
        return FROMNAME;
    }

    public void setFROMNAME(String FROMNAME) {
        this.FROMNAME = FROMNAME;
    }

    public String getTONAME() {
        return TONAME;
    }

    public void setTONAME(String TONAME) {
        this.TONAME = TONAME;
    }

    public Date getDATE() {
        Date date = new Date((long) DATE);
        return date;
    }

    public void setDATE(Date DATE) {
        this.DATE = DATE.getTime();
    }

    public Date getTODATE() {
        Date date = new Date((long)TODATE);
        return date;
    }

    public void setTODATE(Date TODATE) {
        this.TODATE = TODATE.getTime();
    }

    public double getPRICE() {
        return PRICE;
    }

    public void setPRICE(double PRICE) {
        this.PRICE = PRICE;
    }

    public int getCurrentPeole() {
        return CurrentPeole;
    }

    public void setCurrentPeole(int currentPeole) {
        CurrentPeole = currentPeole;
    }

    public int getDelayTime() {
        return DelayTime;
    }

    public void setDelayTime(int delayTime) {
        DelayTime = delayTime;
    }

    public int getCurrentState() {
        return CurrentState;
    }

    public void setCurrentState(int currentState) {
        CurrentState = currentState;
    }
}
